Skip to content

fix #283 - feat: Reduce warnings in build and test logs - #323

Merged
lornakelly merged 18 commits into
open-workflow-specification:mainfrom
fantonangeli:issue-283-feat-Reduce-warnings-in-build-and-test-logs
Aug 13, 2026
Merged

fix #283 - feat: Reduce warnings in build and test logs#323
lornakelly merged 18 commits into
open-workflow-specification:mainfrom
fantonangeli:issue-283-feat-Reduce-warnings-in-build-and-test-logs

Conversation

@fantonangeli

Copy link
Copy Markdown
Member

Closes #283

Description

The open-workflow-diagram-editor build currently produces a large number of warnings, like for React act(...), accessibility, and lint warnings.

Example job: https://github.com/open-workflow-specification/editor/actions/runs/30353445942/job/90256050921?pr=282

Log snippet:

packages/open-workflow-diagram-editor build:prod: This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act
packages/open-workflow-diagram-editor build:prod: stderr | stories/examples/Examples.stories.tsx > Accumulate Room Readings
packages/open-workflow-diagram-editor build:prod: An update to DiagramEditorContextProvider inside a test was not wrapped in act(...).
packages/open-workflow-diagram-editor build:prod: When testing, code that causes React state updates should be wrapped into act(...):
packages/open-workflow-diagram-editor build:prod: act(() => {
packages/open-workflow-diagram-editor build:prod:   /* fire events that update state */
packages/open-workflow-diagram-editor build:prod: });

How to test:

  • pnpm build:prod OR open the CI logs from this PR
  • No warnings are shown

Motivation:

Reducing the existing warnings would make CI logs easier to review and help new warnings to be discovered.

Notes:

This PR also introduces an oxlint configuration making the CI to fail on lint warnings

Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
…ce-warnings-in-build-and-test-logs

Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Copilot AI lite review requested due to automatic review settings August 11, 2026 15:39
@netlify

netlify Bot commented Aug 11, 2026

Copy link
Copy Markdown

Deploy Preview for openworkflow-editor ready!

Name Link
🔨 Latest commit d492b55
🔍 Latest deploy log https://app.netlify.com/projects/openworkflow-editor/deploys/6a7c799c87dbe0000880e353
😎 Deploy Preview https://deploy-preview-323--openworkflow-editor.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Reduces CI/build/test noise by addressing React/testing warnings, consolidating Storybook story setup, and tightening linting to fail on warnings.

Changes:

  • Refactors Storybook stories to share a common createWorkflowStory helper (incl. a play step to wait for render completion).
  • Adjusts tests/stories to minimize React act(...)/render warnings (e.g., SVG edge rendering, disabling lint rule for spec field then).
  • Introduces/updates oxlint + formatting config and makes some builds fail on lint warnings.

Reviewed changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
packages/open-workflow-diagram-editor/vitest.config.ts Simplifies dirname resolution for Vitest config.
packages/open-workflow-diagram-editor/tests/side-panel/NodeDetailsView.test.tsx Suppresses unicorn/no-thenable for spec field then.
packages/open-workflow-diagram-editor/tests/react-flow/edges/Edges.test.tsx Wraps edge components in <svg> and adjusts snapshot target to reduce warnings.
packages/open-workflow-diagram-editor/tests/core/taskDetails.test.ts Suppresses unicorn/no-thenable for spec field then.
packages/open-workflow-diagram-editor/stories/use-cases/UseCases.stories.tsx Uses shared story helper instead of local factory.
packages/open-workflow-diagram-editor/stories/helpers.ts Adds shared createWorkflowStory helper with default args and play wait.
packages/open-workflow-diagram-editor/stories/features/ValidationErrors.stories.tsx Uses shared story helper instead of local factory.
packages/open-workflow-diagram-editor/stories/features/DiagramEditorErrorBoundary.stories.tsx Adds console.error filtering via spyOn to reduce noisy errors in story runs.
packages/open-workflow-diagram-editor/stories/features/DiagramEditorDragNDrop.tsx Removes console logging.
packages/open-workflow-diagram-editor/stories/features/DiagramEditor.stories.tsx Replaces inline story objects with shared helper usage.
packages/open-workflow-diagram-editor/stories/examples/Examples.stories.tsx Uses shared story helper instead of local factory.
packages/open-workflow-diagram-editor/stories/README.md Documents the new helper file.
packages/open-workflow-diagram-editor/src/components/ui/combobox.tsx Removes unused children from input props destructure.
packages/i18n/package.json Adds oxlint/oxfmt scripts and runs lint in build:prod.
packages/i18n/.oxlintrc.json Extends root oxlint configuration.
packages/i18n/.oxfmtrc.json Extends root oxfmt configuration.
examples/vanilla-web-component/vite.config.ts Raises Vite chunk size warning limit.
.oxlintrc.json Updates oxlint plugins and enables denyWarnings.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/open-workflow-diagram-editor/vitest.config.ts
Comment thread packages/open-workflow-diagram-editor/tests/react-flow/edges/Edges.test.tsx Outdated
Comment thread packages/open-workflow-diagram-editor/stories/helpers.ts
Comment thread packages/open-workflow-diagram-editor/stories/helpers.ts
Comment thread .oxlintrc.json Outdated
Comment thread examples/vanilla-web-component/vite.config.ts
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Copilot AI review requested due to automatic review settings August 12, 2026 08:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 19 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Generated file
Suppressed comments (2)

packages/open-workflow-diagram-editor/tests/react-flow/edges/Edges.test.tsx:216

  • Using svg!.firstChild is brittle because firstChild can be a whitespace/text node depending on how JSX is compiled/rendered. Prefer snapshotting the first element child to avoid flakey/incorrect snapshots.
    const svg = container.querySelector("svg");
    expect(svg).not.toBeNull();
    expect(svg!.firstChild).toMatchSnapshot();

packages/open-workflow-diagram-editor/stories/features/DiagramEditorErrorBoundary.stories.tsx:42

  • Capturing console.error into a variable can lose its this binding in some runtimes. Binding it to console avoids edge-case failures when forwarding to the original implementation from inside the spy.
    const originalConsoleError = console.error;

Comment thread .oxlintrc.json
fantonangeli added a commit to fantonangeli/serverlessworkflow-editor that referenced this pull request Aug 12, 2026
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Copilot AI review requested due to automatic review settings August 12, 2026 12:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 19 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Generated file
Suppressed comments (1)

packages/open-workflow-diagram-editor/stories/features/DiagramEditorErrorBoundary.stories.tsx:52

  • The mockImplementation contains an overly long condition with missing spacing around ===, and it calls the extracted console.error function without an explicit receiver. Formatting this improves readability and helps avoid potential lint failures; using .apply(console, ...) preserves the console method binding in all runtimes.
    const consoleErrorSpy = spyOn(console, "error").mockImplementation((...args) => {
      const error = args[1];

      if (error instanceof Error && (error.message===DEFAULT_ERROR_MESSAGE || error.message===CUSTOM_ERROR_MESSAGE)) {
        return;

Comment thread packages/open-workflow-diagram-editor/tests/side-panel/NodeDetailsView.test.tsx Outdated
Comment thread packages/open-workflow-diagram-editor/tests/core/taskDetails.test.ts Outdated
This reverts commit 839f8de.

Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
@fantonangeli
fantonangeli force-pushed the issue-283-feat-Reduce-warnings-in-build-and-test-logs branch from 213efee to bc63334 Compare August 12, 2026 13:35
open-workflow-specification#323 (comment)

Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Copilot AI review requested due to automatic review settings August 12, 2026 13:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 19 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Generated file
Suppressed comments (3)

packages/open-workflow-diagram-editor/stories/helpers.ts:20

  • DiagramEditor is imported using import type, but it’s then referenced in a typeof type query (StoryObj<typeof DiagramEditor>). In TypeScript, typeof in a type position still requires the symbol to exist in the value namespace, so this pattern typically fails with “Cannot use 'DiagramEditor' as a value because it was imported using 'import type'”. Use a module type query instead (or import DiagramEditor as a value).
import type { DiagramEditor } from "./features/DiagramEditor";

type Story = StoryObj<typeof DiagramEditor>;

packages/open-workflow-diagram-editor/tests/core/taskDetails.test.ts:274

  • Grammar nit in the newly added eslint-disable reason: “a Open” should be “an Open”.
        // eslint-disable-next-line unicorn/no-thenable -- then is a Open Workflow Spec field

packages/open-workflow-diagram-editor/tests/side-panel/NodeDetailsView.test.tsx:39

  • Grammar nit in the newly added eslint-disable reason: “a Open” should be “an Open”.
        // eslint-disable-next-line unicorn/no-thenable -- then is a Open Workflow Spec field

open-workflow-specification#323 (review)

Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Copilot AI review requested due to automatic review settings August 12, 2026 13:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 19 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Generated file
Suppressed comments (1)

packages/open-workflow-diagram-editor/src/components/ui/combobox.tsx:276

  • ComboboxChipsInput no longer strips children out of the props spread. If a caller passes children (even accidentally via composition), it will be forwarded into ComboboxPrimitive.Input which likely renders an <input>; React will warn on children for void elements (and it can reintroduce the warnings this PR is trying to eliminate).
function ComboboxChipsInput({ className, ...props }: ComboboxPrimitive.Input.Props) {
  return (
    <ComboboxPrimitive.Input
      data-slot="combobox-chip-input"
      className={cn("dec:min-w-16 dec:flex-1 dec:outline-none", className)}
      {...props}
    />

@lornakelly lornakelly left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kumaradityaraj kumaradityaraj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lornakelly
lornakelly merged commit a496524 into open-workflow-specification:main Aug 13, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Reduce warnings in build and test logs

4 participants